<?php
/**
 * Created by PhpStorm.
 * User: Wei
 * Date: 17/10/5
 * Time: 20:46
 */

use NoahBuscher\Macaw\Macaw;

require_once "../vendor/autoload.php";
//use NoahBuscher\Macaw\Macaw;

header("Content-Type:text/html;charset=utf8");



Macaw::get('fuck', function () {
    echo "成功！<br>";
});

Macaw::get('home/(:id)', 'HomeController@home');

/*Macaw::get('(:all)', function ($fu) {
    echo '未匹配到路由<br>' . $fu;
});*/

//Macaw::error(function() {
//    echo '404 :: Not Found';
//});


Macaw::$error_callback = function() {

    throw new Exception("路由无匹配项 404 Not Found");

};
Macaw::dispatch();